using JTZY.Model.Stock;

namespace JTZY.Model.Stock
{
    /// <summary>
    /// 调仓单
    /// </summary>
    [SugarTable("transferorder")]
    public class Transferorder
    {
        /// <summary>
        /// 订单号 
        /// </summary>
        [SugarColumn(IsPrimaryKey = true, IsIdentity = false)]
        public string OrderId { get; set; }
        /// <summary>
        /// 代理
        /// </summary>
        public long UserId { get; set; }
        /// <summary>
        /// 原仓位 
        /// </summary>
        public long? OldUserId { get; set; }

        /// <summary>
        /// 现在位置 
        /// </summary>
        public long NewUserld { get; set; }

        /// <summary>
        /// 0 调出  1调回 
        /// </summary>
        public string Type { get; set; }

        /// <summary>
        /// Status 
        /// </summary>
        public string Status { get; set; }

        /// <summary>
        /// CreateTime 
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// UpdateTime 
        /// </summary>
        public DateTime? UpdateTime { get; set; }

        /// <summary>
        /// 订单总金额 
        /// </summary>
        public decimal OrderAmt { get; set; }

        [Navigate(NavigateType.OneToMany, nameof(Transferorderitem.OrderId), nameof(OrderId))] //自定义关系映射
        public List<Transferorderitem> TransferorderitemNav { get; set; }

        [SugarColumn(IsIgnore=true)]
        public List<Transferorderdetail> TransferorderdetailNav { get; set; }

        [SugarColumn(IsIgnore = true)]
        public string NewUserName { get; set; }
    }
}